package xcmg.device.dao.mapper;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import xcmg.device.dao.entity.DataDictionaryDO;
import xcmg.device.dao.entity.MaterialClassDO;
import xcmg.device.dao.entity.company.DealerClassDO;
import xcmg.device.service.vo.MaterialClassVO;

import java.util.List;

/**
 * Created by 阿斯顿 on 2018/7/27.
 */
@Mapper
public interface MaterialClassMapper {

   int  add(MaterialClassDO materialClassDO);

    List<MaterialClassDO> getByPId(MaterialClassVO materialClassVO);

    int update(MaterialClassDO materialClassDO);

    int deleteByValue(@Param("orgId") String orgId,@Param("classValue") String classValue);

    String getMaxValue(@Param("pId")String pId,@Param("orgId")String orgId);

    MaterialClassDO  item(String id);

    Integer nameCount(MaterialClassDO record);

   List<MaterialClassDO> listIdByValue(MaterialClassDO classDO);

   Integer countCompanyByType(String id);

    Integer classCodeCount(MaterialClassDO materialClassDO);

    MaterialClassDO itemByCode(@Param("typeId") String typeId, @Param("orgId")String orgId);

    List<MaterialClassDO> getAllSecondlist(@Param("orgId")String orgId);
}
